# -*-* encoding:UTF-8 -*-
# author            : mengy
# date              : 2018/12/7
# python-version    : Python 3.7.0
# description       : 存储匹配班次信息URL

from com.python.demo.tickets_qry.stations import stations
import warnings

start = input("请输入起始城市:\n")
start_code = stations[start]
end = input("请输入目的地城市:\n")
end_code = stations[end]
date = input("请输入出发时间:（例如:2018-12-07）\n")
print("正在查询 " + start + " 到 " + end + " 的列车，请稍后...")

url = 'https://kyfw.12306.cn/otn/leftTicket/query' \
      '?leftTicketDTO.train_date={}' \
      '&leftTicketDTO.from_station={}' \
      '&leftTicketDTO.to_station={}' \
      '&purpose_codes=ADULT'.format(date, start_code, end_code)

warnings.filterwarnings("ignore")       #这个网站是有安全警告的，这段代码可以忽略警告

